package prv.behavioral.strategy;

//Test application
class Demo {

	public static void main(String[] args) {

		Context context;

		// Three contexts following different strategies
		context = new Context(new ConcreteStrategyAdd());
		int resultA = context.executeStrategy(3, 4);

		context = new Context(new ConcreteStrategySubtract());
		int resultB = context.executeStrategy(3, 4);

		context = new Context(new ConcreteStrategyMultiply());
		int resultC = context.executeStrategy(3, 4);

		System.out.println("Result A : " + resultA);
		System.out.println("Result B : " + resultB);
		System.out.println("Result C : " + resultC);
	}
}
